feat: Minecraft mod summarization (Forge/Fabric)#966
feat: Minecraft mod summarization (Forge/Fabric)#966luiox wants to merge 7 commits intoCol-E:masterfrom
Conversation
| JsonObject json = JsonParser.parseString(jsonText).getAsJsonObject(); | ||
| if (json.has("entrypoints")) { | ||
| JsonObject entrypoints = json.getAsJsonObject("entrypoints"); | ||
| if (entrypoints.has("main")) { |
There was a problem hiding this comment.
There's also client and server entry points. There technically are more like modmenu but I don't know where to find the "full" list of all these extra entry points.
There was a problem hiding this comment.
I will modify the code according to the content of the document at https://wiki.fabricmc.net/documentation:fabric_mod_json.
| consumer.appendSummary(title); | ||
|
|
||
| if (!finalMcVersion.isEmpty()) { | ||
| consumer.appendSummary(new Label(Lang.getBinding("service.analysis.minecraft-version").get() + " " + finalMcVersion)); |
There was a problem hiding this comment.
You can use String.format templates in bindings, see menu.mappings.export.unsupported for example:
// menu.mappings.export.unsupported=%s (Unsupported)
Lang.format("menu.mappings.export.unsupported", formatName)| } | ||
|
|
||
| // 2. Try to find Forge mod information | ||
| FileInfo forgeFileInfo = resource.getFileBundle().get("mcmod.info"); |
There was a problem hiding this comment.
I think mcmod.info is used mostly in older versions of forge (Like 1.12), and newer versions have this info at META-INF/mods.toml - Would be nice to support both
|
I add toml4j for parse the |
497d549 to
cec9a1c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #966 +/- ##
=========================================
Coverage 65.09% 65.09%
Complexity 4293 4293
=========================================
Files 396 396
Lines 18436 18436
Branches 2958 2958
=========================================
Hits 12001 12001
Misses 4964 4964
Partials 1471 1471 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
What's new